//
//  TMComplainCell.m
//  国学商家管理
//
//  Created by Tao Li on 2018/6/21.
//  Copyright © 2018年 mac. All rights reserved.
//

#import "TMComplainCell.h"
#import "TMFinanceModel.h"
#import "TMUserModel.h"
//#import "TMUserOrderModel.h"
@implementation TMComplainCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    if (self.isUserManage == YES) {
        self.gradeLabel.hidden = NO;
    }else{
        self.gradeLabel.hidden = YES;
    }
}
- (void)setIsUserManage:(BOOL)isUserManage{
    _isUserManage = isUserManage;
    if (_isUserManage == YES) {
        self.gradeLabel.hidden = NO;
    }else{
        self.gradeLabel.hidden = YES;
    }
}

- (void)setIsFanincal:(BOOL)isFanincal{
    isFanincal = [[ NSUserDefaults standardUserDefaults] boolForKey:@"isfanical"];
    _isFanincal = isFanincal;
    if (_isFanincal == YES) {
        NSLog(@"yes---------------------");
        //self.userName.text = @"成功邀请XXX获得 80 元奖励,详情请查看账单";
        //self.handleLabel.text = @"";
        //cell.handleLabel.textColor = [UIColor hx_colorWithHexRGBAString:@"009CFF"];
    }else{
        NSLog(@"no---------------------");
//        self.userName.text = @"订单号：11188906543";
//        self.handleLabel.text = @"+500元";
//        self.handleLabel.textColor = [UIColor hx_colorWithHexRGBAString:@"009CFF"];
    }
}

//- (void)setUserModel1:(TMUserManageModel *)userModel1{
//    _userModel1 = userModel1;
//    self.userName.text = [NSString stringWithFormat:@"用户名：%@", _userModel1.username];
//    self.gradeLabel.text = [NSString stringWithFormat:@"等级：%ld", _userModel1.userlv];
//    self.handleLabel.text = @"详细";
//}

-(void)setFaincalModel1:(TMFinanceModel *)faincalModel1{
    _faincalModel1 = faincalModel1;
    self.userName.text = [NSString stringWithFormat:@"订单号：%@", _faincalModel1.number];
     self.handleLabel.text = [NSString stringWithFormat:@"+%.2f元", faincalModel1.fact_price];
    self.handleLabel.textColor = [UIColor hx_colorWithHexRGBAString:@"009CFF"];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

//- (void)setFaincalModel:(TMFinanceModel *)faincalModel{
//    _faincalModel = faincalModel;
//    self.userName.text = faincalModel.username;
//    if (_faincalModel.status == 1) {
//        self.handleLabel.text = @"未处理";
//    }else{
//        self.handleLabel.text = @"已处理";
//    }
//}
@end
